<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="com.fz.mybatis.DbHelper" %>
<%@ page import="com.fz.entity.Student" %>
<%@ page import="com.fz.mapper.StudentMapper" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <title>首页</title>
</head>
<body>
${2*6}
<hr>
<%
    SqlSession ss = new DbHelper().getSession();
    StudentMapper stu = ss.getMapper(StudentMapper.class);
    List<Student> list = stu.query();
    pageContext.setAttribute("student",list);
%>
<c:forEach items="${student}" var="stu">
    ${stu.getName()}<br>
</c:forEach>
<hr>
</body>
</html>